package com.xingkeduo.dto.transter.marketingsuccessdetail;

import java.util.List;

import com.alibaba.fastjson.JSONObject;

import lombok.Data;

/**
 * @Description TODO
 * @Date 2019/5/21 20:43
 * @Created 情绪十分不稳定的Shadow
 */

@Data
public class Marketing_success_detail {

    private String name;
    private String store_id;
    private String store_name;
    private Integer quantity;
    private String coupon_id;
    private String type;
    private String coupon_detail_id;
    private String use_end_time;
    private String pic;
    private String card_type;
    private List<String> reduce_cost;
    private List<String> discount;
    private String least_cost;

    public void covert(JSONObject json) {
		 this.name=json.getOrDefault("servprodName", "")==null?"":json.getOrDefault("servprodName", "").toString();
		 this.quantity = json.getOrDefault("totalQuantity", "0")==null?0:Integer.parseInt(json.getOrDefault("totalQuantity", "0").toString());
		 this.coupon_id = json.getOrDefault("supportBusinessId", "")==null?"":json.getOrDefault("supportBusinessId", "0").toString();
		 this.type="1";
		 this.pic="common";
	}

}
